package paper.dao.impl;

import java.util.List;

import keter.dao.base.KeterAbstractDao;

import org.springframework.stereotype.Repository;

import paper.dao.CommentsDao;
import paper.domain.Comments;

@Repository
public class CommentsDaoImpl extends KeterAbstractDao<Comments> implements CommentsDao {

	@Override
	public List<Comments> findByMainId(Long mid) {
      return getResultList("from Comments t where t.mainId = :mid order by created desc", 
      wrap("mid"),
      wrap(mid));
	}
    /**
     * <p>Method ：findByTeacher
     * <p>Description : 查找自己维护的课题
     *
     * @param id
     * @return 
     * @see paper.dao.TopicDao#findByTeacher(java.lang.Long)
     */
//    @Override
//    public List<Topic> findByCreator(Long id) {
//       return getResultList("from Topic t where t.creatorId = :id order by created desc", 
//              wrap("id"),
//              wrap(id));
//    }
    
    
    
}